package com.kevin.learn.策略模式.工厂加策略;

public class InviteRewardImpl {
    private static long userId=23456L;
    public static void main(String[] args) {
        FactorRewardStrategyFactory strategyFactory = new FactorRewardStrategyFactory();  //创建工厂
        if (true) {  //新用户返奖策略
            NewUserRewardStrategyA newUserRewardStrategyA = (NewUserRewardStrategyA) strategyFactory.createStrategy(NewUserRewardStrategyA.class);
            RewardContext rewardContext = new RewardContext(newUserRewardStrategyA);
            rewardContext.doStrategy(userId); //执行返奖策略
        }
    }
}